home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1993-09-07 | 11.1 KB | 331 lines | [ TEXT/MPS ]
#include "Types.r" #include "OCETemplates.h" #include "OCE.r" #include "Track.h" #include "Album.h" ///////////////////////////////////////////////////////////////////////// // // BOOKKEEPING - this is an aspect template with this base resource id // ///////////////////////////////////////////////////////////////////////// #define kAlbum2ndInfoPageAspect kDETThirdID resource 'deta' (kAlbum2ndInfoPageAspect, purgeable) { 0, // Drop priority dropCheckAlways, // Drop check flag notMainAspect // Not the main aspect }; resource 'rstr' (kAlbum2ndInfoPageAspect+kDETTemplateName, purgeable) { "Album Second Info Page Aspect" }; ///////////////////////////////////////////////////////////////////////// // // BINDING - associate this aspect with records of this type // ///////////////////////////////////////////////////////////////////////// resource 'rstr' (kAlbum2ndInfoPageAspect+kDETRecordType, purgeable) { "Album" }; // Icons include "AlbumIcons" 'ICN#'(0) as 'ICN#'(kAlbum2ndInfoPageAspect+kDETAspectMainBitmap, purgeable); include "AlbumIcons" 'icl4'(0) as 'icl4'(kAlbum2ndInfoPageAspect+kDETAspectMainBitmap, purgeable); include "AlbumIcons" 'icl8'(0) as 'icl8'(kAlbum2ndInfoPageAspect+kDETAspectMainBitmap, purgeable); // Code include "Album1Code" 'detc'(0) as 'detc'(kAlbum2ndInfoPageAspect+kDETAspectCode, purgeable); //---------------------------------------------------------------------- // // Lookup resource - what attributes to lookup, // how to assign them to properties // //---------------------------------------------------------------------- resource 'dett' (kAlbum2ndInfoPageAspect+kDETAspectLookup, purgeable) { { {"Album Track Info"}, typeBinary, useForInput, useForOutput, notInSublist, isNotAlias, isNotRecordRef, { 'long', prPlayingTimeHours, 0; 'long', prPlayingTimeMinutes, 0; 'long', prPlayingTimeSeconds, 0; }; {"Track"}, typeBinary, notForInput, notForOutput, useInSublist, isNotAlias, isNotRecordRef, {}; } }; //---------------------------------------------------------------------- // // Drag and Drop Information // //---------------------------------------------------------------------- resource 'rstr' (kAlbum2ndInfoPageAspect+kDETAspectDragInString, purgeable) { "Do you want to add %3%“^3”%the selected items% to the track address list of *0x/the/* ^1 “^2”?" }; resource 'rst#' (kAlbum2ndInfoPageAspect+kDETAspectAttrDragIn, purgeable) { { "", "Track", "Track" } }; //---------------------------------------------------------------------- // // Sublist Sorting Information // //---------------------------------------------------------------------- resource 'detm' (kAlbum2ndInfoPageAspect+kDETAspectViewMenu, purgeable) { kAlbum2ndInfoPageAspect+kDETAspectViewMenu, { kDETAspectName, "by Title"; -prTrackNumber, "by Track Number"; } }; resource 'detp' (kAlbum2ndInfoPageAspect+kDETAspectReverseSort, purgeable) { { prTrackNumber } }; //---------------------------------------------------------------------- // // Balloon help for the properties // //---------------------------------------------------------------------- resource 'rst#' (kAlbum2ndInfoPageAspect+kDETAspectBalloons,purgeable) { { "The number of tracks on the album.", "The number of tracks on the album. Uneditable because the record is locked or access controled.", "The number of hours of music on the album.", "The number of hours of music on the album. Uneditable because the record is locked or access controled.", "The number of minutes of music on the album.", "The number of minutes of music on the album. Uneditable because the record is locked or access controled.", "The number of seconds of music on the album.", "The number of seconds of music on the album. Uneditable because the record is locked or access controled.", } }; // -------------------------------------------------------------------- // -------------------------------------------------------------------- // // Album Information Page // // -------------------------------------------------------------------- // -------------------------------------------------------------------- ///////////////////////////////////////////////////////////////////////// // // BOOKKEEPING - this is an information page template with this base resource id // and this view // ///////////////////////////////////////////////////////////////////////// #define kAlbum2ndInfoPage kDETFourthID #define kTitleTop (85) #define kTitleBottom (kTitleTop+12) #define kSublistTop (kTitleBottom+2) #define kSublistBottom (kDETRecordInfoWindHeight-40) #define kSublistLeft (12) #define kSublistRight (kDETRecordInfoWindWidth-12) resource 'deti' (kAlbum2ndInfoPage, purgeable) { 2000, {kSublistTop, kSublistLeft, kSublistBottom, kSublistRight}, selectFirstText, { kDETNoProperty, kDETNoProperty, kAlbum2ndInfoPage; kDETNoProperty, kDETNoProperty, kAlbum2ndInfoPage + 1; kDETNoProperty, kDETNoProperty, kAlbum2ndInfoPage + 2; kDETNoProperty, kDETNoProperty, kAlbum2ndInfoPage + 3; }, { kDETNoProperty, kDETNoProperty, kAlbum2ndInfoPage + 4; } }; resource 'rstr' (kAlbum2ndInfoPage+kDETTemplateName, purgeable) { "Album 2nd Info Page" }; resource 'rstr' (kAlbum2ndInfoPage+kDETInfoPageName, purgeable) { "Track Info" }; ///////////////////////////////////////////////////////////////////////// // // BINDING - associate this information page with records of this type // and with this aspect // ///////////////////////////////////////////////////////////////////////// resource 'rstr' (kAlbum2ndInfoPage+kDETRecordType, purgeable) { "Album" }; resource 'rstr' (kAlbum2ndInfoPage+kDETInfoPageMainViewAspect, purgeable) { "Album Second Info Page Aspect" }; ///////////////////////////////////////////////////////////////////////// // // VIEWS - what you see in this information page // ///////////////////////////////////////////////////////////////////////// #define kMyFirstColumnLeft (55) #define kMyFirstColumnRight (kMyFirstColumnLeft + 120) #define kEditTextWidth (23) #define kSpaceBeforeEditDesc (25) #define kNumEditColumns (3) #define kMyEditColumnWidth (70) #define k1stEditColumnLeft (kMyFirstColumnRight + 2) #define k2ndEditColumnLeft (k1stEditColumnLeft + kMyEditColumnWidth) #define k3rdEditColumnLeft (k2ndEditColumnLeft + kMyEditColumnWidth) #define k4thEditColumnLeft (k3rdEditColumnLeft + kMyEditColumnWidth) #define kNumTracksTop (40) #define kNumTracksBottom (kNumTracksTop + kDETAppFontLineHeight + 4) #define kPlayingTimeTop (kNumTracksBottom + 4) #define kPlayingTimeBottom (kPlayingTimeTop + kDETAppFontLineHeight + 4) #define k2ndColumnRightInset (kDETRecordInfoWindWidth - 10) #define kButtonTop (kSublistBottom+15) #define kButtonBottom (kButtonTop+16) #define kOpenLeft 62 #define kOpenRight 112 #define kAddLeft 208 #define kAddRight 258 #define kRemoveLeft 270 #define kRemoveRight 320 #define kIconLeft 2 #define kNameLeft 22 #define kTrackNumberLeft 162 #define kPrefLeft 285 #define kPrefRight 305 #define kIconEntryTop -7 #define kIconEntryBottom 9 #define kEntryTop -5 #define kEntryBottom 9 resource 'detv' (kAlbum2ndInfoPage, purgeable) { { kDETSubpageIconRect, kDETNoFlags, kDETAspectMainBitmap, Bitmap { kDETLargeIcon }; } }; resource 'detv' (kAlbum2ndInfoPage + 1, purgeable) { { {kNumTracksTop, kMyFirstColumnLeft, kNumTracksBottom, kMyFirstColumnRight}, kDETNoFlags, kDETNoProperty, StaticTextFromView { kDETApplicationFont, kDETApplicationFontSize, kDETRight, kDETBold, "Number of tracks:" }; {kNumTracksTop, k1stEditColumnLeft, kNumTracksBottom, k1stEditColumnLeft + kEditTextWidth}, kDETNoFlags, prNumTracks, StaticText { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal }; } }; resource 'detv' (kAlbum2ndInfoPage + 2, purgeable) { { {kPlayingTimeTop, kMyFirstColumnLeft, kPlayingTimeBottom, kMyFirstColumnRight}, kDETNoFlags, kDETNoProperty, StaticTextFromView { kDETApplicationFont, kDETApplicationFontSize, kDETRight, kDETBold, "Total playing time:" }; {kPlayingTimeTop-2, k1stEditColumnLeft, kPlayingTimeBottom-2, k1stEditColumnLeft + kEditTextWidth}, kDETEnabled + kDETNumericOnly, prPlayingTimeHours, EditText { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal }; {kPlayingTimeTop, k1stEditColumnLeft + kSpaceBeforeEditDesc, kPlayingTimeBottom, k2ndEditColumnLeft}, kDETNoFlags, kDETNoProperty, StaticTextFromView { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal, "Hours" }; {kPlayingTimeTop-2, k2ndEditColumnLeft, kPlayingTimeBottom-2, k2ndEditColumnLeft + kEditTextWidth}, kDETEnabled + kDETNumericOnly, prPlayingTimeMinutes, EditText { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal }; {kPlayingTimeTop, k2ndEditColumnLeft + kSpaceBeforeEditDesc, kPlayingTimeBottom, k3rdEditColumnLeft}, kDETNoFlags, kDETNoProperty, StaticTextFromView { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal, "Minutes" }; {kPlayingTimeTop-2, k3rdEditColumnLeft, kPlayingTimeBottom-2, k3rdEditColumnLeft + kEditTextWidth}, kDETEnabled + kDETNumericOnly, prPlayingTimeSeconds, EditText { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal }; {kPlayingTimeTop, k3rdEditColumnLeft + kSpaceBeforeEditDesc, kPlayingTimeBottom, k4thEditColumnLeft}, kDETNoFlags, kDETNoProperty, StaticTextFromView { kDETApplicationFont, kDETApplicationFontSize, kDETLeft, kDETNormal, "Seconds" }; } }; resource 'detv' (kAlbum2ndInfoPage + 3, purgeable) { { {kSublistTop-1, kSublistLeft-1, kSublistBottom+1, kSublistRight+1}, kDETNoFlags, kDETNoProperty, Box { kDETUnused }; {kTitleTop, kSublistLeft+kNameLeft, kTitleBottom, kSublistLeft+kTrackNumberLeft-2}, kDETNoFlags, kDETAspectName, StaticCommandTextFromView { kDETDefaultFont, kDETDefaultFontSize, kDETLeft, kDETUnderline, "Title", kDETChangeViewCommand, -1 }; {kTitleTop, kSublistLeft+kTrackNumberLeft, kTitleBottom, kSublistLeft+kPrefLeft-2}, kDETNoFlags, prTrackNumber, StaticCommandTextFromView { kDETDefaultFont, kDETDefaultFontSize, kDETLeft, kDETNormal, "Track Number", kDETChangeViewCommand, -2 }; {kButtonTop, kOpenLeft, kButtonBottom, kOpenRight}, kDETNoFlags, kDETOpenSelectedItems, Button { kDETApplicationFont, 10, kDETCenter, kDETNormal, "Open", kDETOpenSelectedItems }; {kButtonTop, kAddLeft, kButtonBottom, kAddRight}, kDETNoFlags, kDETAddNewItem, Button { kDETApplicationFont, 10, kDETCenter, kDETNormal, "Add…", kDETAddNewItem }; {kButtonTop, kRemoveLeft, kButtonBottom, kRemoveRight}, kDETNoFlags, kDETRemoveSelectedItems, Button { kDETApplicationFont, 10, kDETCenter, kDETNormal, "Remove", kDETRemoveSelectedItems }; } }; resource 'detv' (kAlbum2ndInfoPage + 4, purgeable) { { {kIconEntryTop, kIconLeft, kIconEntryBottom, kNameLeft-4}, kDETHilightIfSelected, kDETAspectMainBitmap, Bitmap { kDETMiniIcon }; {kEntryTop, kNameLeft, kEntryBottom, kTrackNumberLeft-2}, kDETHilightIfSelected + kDETDynamicSize, kDETAspectName, EditText { kDETDefaultFont, kDETDefaultFontSize, kDETLeft, kDETNormal }; {kEntryTop, kTrackNumberLeft, kEntryBottom, kPrefLeft-2}, kDETHilightIfSelected + kDETDynamicSize, prTrackNumber, EditText { kDETDefaultFont, kDETDefaultFontSize, kDETLeft, kDETNormal }; } };